<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>寻物启示列表</title>
<script type="text/javascript" src="../../../js/jquery.js"></script>
<script type="text/javascript" src="../../../js/jquery-ui-personalized.min.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/notice.js"></script>
<link type="text/css" href="../../../style/theme/ui.all.css" rel="stylesheet" />
<link type="text/css" href="../style/style.css" rel="stylesheet"/>
<style type="text/css">
</style>

</head>
<body>
	<h1>${dormSupervisor.building.name }的寻物启事列表</h1>
	<div class="ajaxMessage"></div>
	<form action="lostNoticeList.do" method="get" name="bulletinDTO">
		<div class="filterForm">
			<label id="query">关键字</label>
			<input type="text" name="query" id="query"/>
			<label for="fromDate">起始时间</label>
			<input name="fromDate" id="fromDate" class="datepicker"/>
			<label for="toDate">结束时间</label>
			<input id="toDate" name="toDate" class="datepicker"/>
			<input type="submit" name="submit" value="查询"/>
		</div>	
	</form>

	<c:choose>
		<c:when test="${!empty lostNotices.list}">
			<div id="modifyDialog" class="ajaxEvent" title="修改启事">		
				<div>
					<input type="hidden" name="id"/>
					<div>
						<label for="title_input">
							<span>说明副标题:</span>
						</label>
					</div>
					<div><input id="title_input" type="text" name="subtitle" size="25"/>*</div>
				</div>
				<div>
					<div><label for="description_input"><span>内容:</span></label></div>
					<div><textarea rows="5" cols="25" name="description"></textarea>*</div>
				</div>
				<div>
					<div><label><span>发布人姓名：</span></label></div>
					<div><input type="text" name="person" size="25" />*</div>
				</div>		
			</div>
			<table class="notices" border="1px">
				<thead>
					<tr>
						<td>ID</td><td>副标题</td><td>内容</td><td>发布人</td><td>发布时间</td><td>操作</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${lostNotices.list}" var="notice" >
						<tr>
							<td class="id">${notice.id }</td>
							<td class="subtitle">${notice.subtitle }</td>
							<td class="description">${notice.description }</td>
							<td class="person">${notice.person }</td>
							<td class="processDate"><fmt:formatDate value="${notice.status.processDate }" type="both" /></td>
							<td class="operation">
								<button class="ajaxEvent" name="modify" title="${notice.id }">修改</button>
								<button class="ajaxEvent" name="delete" title="${notice.id }">删除</button>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</c:when>
		<c:otherwise>
			<p>暂时没有符合条件的寻物启事</p>
		</c:otherwise>
	</c:choose>
</body>
</html>